home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2002 November / CD 1 / APC0211D1.ISO / workshop / prog / files / ActivePerl-5.6.1.633-MSWin32.msi / _ab119e429aee2f540fea322fa05bdffd < prev    next >
Encoding:
Text File  |  2002-06-17  |  875 b   |  34 lines

  1. # NOTE: Derived from ..\blib\lib\Tk\Scrollbar.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package Tk::Scrollbar;
  5.  
  6. #line 222 "..\blib\lib\Tk\Scrollbar.pm (autosplit into ..\blib\lib\auto\Tk\Scrollbar\StartDrag.al)"
  7. # tkScrollStartDrag --
  8. # This procedure is called to initiate a drag of the slider.  It just
  9. # remembers the starting position of the slider.
  10. #
  11. # Arguments:
  12. # w -        The scrollbar widget.
  13. # x, y -    The mouse position at the start of the drag operation.
  14.  
  15. sub StartDrag
  16. {my $w = shift;
  17.  my $x = shift;
  18.  my $y = shift;
  19.  return unless (defined ($w->cget('-command')));
  20.  $initMouse  = $w->fraction($x,$y);
  21.  @initValues = $w->get();
  22.  if (@initValues == 2)
  23.   {
  24.    $initPos = $initValues[0];
  25.   }
  26.  else
  27.   {
  28.    $initPos = $initValues[2] / $initValues[0];
  29.   }
  30. }
  31.  
  32. # end of Tk::Scrollbar::StartDrag
  33. 1;
  34.